<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
</head>

<body>
    <header class="aui-bar aui-bar-nav" style="padding-top:25px">
        <a class="aui-pull-left" onclick="api.closeWin();">返回</a>
        <div class="aui-title">账单查询</div>
    </header>
    <div class="aui-content vue">
        <ul class="aui-list aui-form-list">
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label">客户号</div>
                    <div class="aui-list-item-input">
                        <input type="text" placeholder="请输入" v-model="form.customerCode">
                    </div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label">起始日期</div>
                    <div class="aui-list-item-input">
                        <input type="number" placeholder="例：20180101（可不填写）" v-model="form.startTime">
                    </div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label">结束日期</div>
                    <div class="aui-list-item-input">
                        <input type="number" placeholder="例：20180131（可不填写）" v-model="form.endTime">
                    </div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner">
                    <div class="aui-list-item-label">交易类型</div>
                    <div class="aui-list-item-input">
                        <select v-model="form.ordersType">
                            <option value="">全部</option>
                            <option value="3">收款</option>
                            <option value="4">提现</option>
                        </select>
                    </div>
                </div>
            </li>
            <li class="aui-list-item">
                <div class="aui-list-item-inner aui-list-item-center aui-list-item-btn">
                    <div class="aui-btn aui-btn-danger aui-btn-block aui-btn-sm" style="background-color:#fd5454 !important;" @click="submit">提交</div>
                </div>
            </li>
        </ul>
        <div style="font-size:0.6rem;color:#ff2600;padding:1rem">
            注：起始日期不填，默认为 30 天前的日期。结束日期不填，默认为当天日期，日期间距须小于一个月
        </div>
    </div>
    <script type="text/javascript" src="../script/vue.js"></script>
    <script type="text/javascript" src="../script/app.js"></script>
    <script type="text/javascript">
        apiready = function() {
            var user = app.getUser();
            var Ve = new Vue({
                el: '.vue',
                data: {
                    form: {
                        customerCode: user.customerCode,
                        startTime: '',
                        endTime: '',
                        ordersType: ''
                    }
                },
                methods: {
                    submit: function() {
                        if (!this.form.customerCode) {
                            app.error('请输入客户号')
                            return
                        }
                        api.openWin({
                            name: 'bill_result',
                            url: 'bill_result.html',
                            animation: {
                                type: 'movein',
                                subType: 'from_bottom'
                            },
                            pageParam: this.form
                        });
                    }
                }
            })
        }
    </script>
</body>

</html>
